package com.bkhc.common.service;

import com.bkhc.common.entity.Lookup;
import com.bkhc.common.repository.*;
import com.bkhc.common.util.response.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LookupService {

    @Autowired
    private LookupRepository repository;

    public ResultJson<?> queryItemByClass(String classItem) {
        List<Lookup> items = repository.findByItemClass(classItem);
        ResultJson resultJson = ResultJson.success();
        resultJson.setData(items);
        return resultJson;
    }
}
